/**
 * Created by user on 2017/3/24.
 */
module.exports = function (httpservice,$http) {
  var caseBarAccountService = {
    accountType:accountType,
    accountListSearch:accountListSearch,
    accountDelete:accountDelete,
    accountAmend:accountAmend,
    accountAdd:accountAdd,
  };

  //记账类型
   function accountType() {
    return $http({
      method:"POST",
      url:httpservice.accountTypeUrl,
      // params:{}
    })
  };

  //筛选搜索
   function accountListSearch(params) {
     // var params = {'caseId':caseId,'pageNum':pageNum,'pageSize':pageSize};
    return $http({
      method:"POST",
      url:httpservice.accountListSearchUrl,
      params: params
    })
  };

  //删除记账记录
   function accountDelete(params) {
    return $http({
      method:"POST",
      url:httpservice.accountDeleteUrl,
      params:params,
    })
  };

  //修改记账记录
   function accountAmend(params) {
    return $http({
      method:"POST",
      url:httpservice.accountAmendUrl,
      params:params
    })
  };

  //添加记账记录
   function accountAdd(params) {
    return $http({
      method:"POST",
      url:httpservice.accountAddUrl,
      params:params
    })
  };

  return caseBarAccountService;

};
